package com.zlyx.easy.swagger.model;

import java.util.List;
import java.util.Map;

import com.zlyx.easy.core.tool.Ops;

import springfox.documentation.service.Header;
import springfox.documentation.service.VendorExtension;

/**
 * @Auth 赵光
 * @Describle
 */
public class ResponseMessage {

	/**
	 * 响应描述
	 */
	private String message;

	/**
	 * 响应实体容器
	 */
	private Class<?> responseContainer;

	/**
	 * 响应实体
	 */
	private Class<?> responseClass;

	/**
	 * 响应消息头
	 */
	private Map<String, Header> headers;

	private List<VendorExtension<?>> vendorExtensions;

	public ResponseMessage(String message) {
		this.message = message;
	}

	public ResponseMessage(String message, Class<?> responseClass) {
		this.message = message;
		this.responseClass = responseClass;
	}

	public ResponseMessage(String message, Class<?> responseContainer, Class<?> responseClass,
			Map<String, Header> headers) {
		this.message = message;
		this.responseContainer = responseContainer;
		this.responseClass = responseClass;
		this.headers = headers;
	}

	public ResponseMessage(String message, Class<?> responseContainer, Class<?> responseClass,
			Map<String, Header> headers, List<VendorExtension<?>> vendorExtensions) {
		this.message = message;
		this.responseContainer = responseContainer;
		this.responseClass = responseClass;
		this.headers = headers;
		this.vendorExtensions = vendorExtensions;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Class<?> getResponseContainer() {
		return responseContainer;
	}

	public void setResponseContainer(Class<?> responseContainer) {
		this.responseContainer = responseContainer;
	}

	public Class<?> getResponseClass() {
		return responseClass;
	}

	public void setResponseClass(Class<?> responseClass) {
		this.responseClass = responseClass;
	}

	public Map<String, Header> getHeaders() {
		return headers;
	}

	public void setHeaders(Map<String, Header> headers) {
		this.headers = headers;
	}

	public List<VendorExtension<?>> getVendorExtensions() {
		return vendorExtensions;
	}

	public void setVendorExtensions(List<VendorExtension<?>> vendorExtensions) {
		this.vendorExtensions = vendorExtensions;
	}

	@Override
	public String toString() {
		return Ops.toJson(this);
	}
}
